package com.semidata.trp.business.mapper;

import java.sql.Timestamp;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.semidata.trp.business.model.AlgorithmModel;
import com.semidata.trp.business.model.AllocationModel;
import com.semidata.trp.business.model.AreaModel;
import com.semidata.trp.business.model.FixedCostModel;
import com.semidata.trp.business.model.KeyWordModel;
import com.semidata.trp.business.model.MaterialModel;
import com.semidata.trp.business.model.MaterialWeightModel;
import com.semidata.trp.business.model.OrganizationModel;
import com.semidata.trp.business.model.PositionModel;
import com.semidata.trp.business.model.ResourceAreaModel;
import com.semidata.trp.business.model.ResourceHourModel;
import com.semidata.trp.business.model.ResourceModel;
import com.semidata.trp.business.model.ResourcePriceModel;
import com.semidata.trp.business.model.StrategyHotword;
import com.semidata.trp.business.model.StrategyModel;
import com.semidata.trp.business.model.StrategyAreaModel;
import com.semidata.trp.business.model.StrategyHourModel;
import com.semidata.trp.business.model.TrafficModel;

public interface BusinessMapper {
    
    List<OrganizationModel> getOrganizations(@Param("timestamp") Timestamp timestamp);
    
    List<AreaModel> getAreas();

    List<MaterialModel> getMaterials(@Param("timestamp") Timestamp timestamp);

    List<PositionModel> getPositions(@Param("timestamp") Timestamp timestamp);

    List<TrafficModel> getTraffics(@Param("timestamp") Timestamp timestamp);
    
    List<ResourceModel> getResources(@Param("timestamp") Timestamp timestamp);
    
    List<ResourceAreaModel> getResourceAreas(@Param("resourceIds") List<Integer> resourceIds);

    List<ResourceHourModel> getResourceHours(@Param("resourceIds") List<Integer> resourceIds);
    
    List<AllocationModel> getAllocations(@Param("resourceIds") List<Integer> resourceIds);

    List<StrategyModel> getStrategies(@Param("timestamp") Timestamp timestamp);
    
    List<StrategyAreaModel> getStrategyAreas(@Param("strategyIds") List<Integer> strategyIds);

    List<StrategyHourModel> getStrategyHours(@Param("strategyIds") List<Integer> strategyIds);

    List<ResourcePriceModel> getResourcePrices(@Param("strategyIds") List<Integer> strategyIds);

    List<MaterialWeightModel> getMaterialWeights(@Param("strategyIds") List<Integer> strategyIds);
    
    List<KeyWordModel> getKeywordsByLevel(@Param("level") Integer level, @Param("parentId") Integer parentId);
    
    List<StrategyHotword> getStrategyHotwords(@Param("strategyIds") List<Integer> strategyIds);
    
    int insertKeyWord(KeyWordModel keyword);
    
    int updateKeyWord(@Param("id") Integer id);
    
    List<FixedCostModel> getFixedCost(@Param("timestamp") Timestamp timestamp);

	List<AlgorithmModel> getAlgorithms(@Param("timestamp") Timestamp timestamp);

}
